﻿using Domain.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class MCConfigers : IEntityTypeConfiguration<MC>
    {
        public void Configure(EntityTypeBuilder<MC> builder)
        {
            builder.ToTable(nameof(MC));
            builder.Property(x => x.FirstKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.FirstKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.SecondKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.SecondKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.ThirdKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.ThirdKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.MajorKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.MajorKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.MajorId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.MajorName).IsRequired(false).HasMaxLength(60);

            builder.Property(x => x.NewFirstKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.NewFirstKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.NewSecondKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.NewSecondKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.NewThirdKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.NewThirdkindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.NewMajorKindId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.NewMajorKindName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.NewMajorId).IsRequired(false).HasMaxLength(2);
            builder.Property(x => x.NewMajorName).IsRequired(false).HasMaxLength(60);

            builder.Property(x => x.HumanId).IsRequired(false).HasMaxLength(30);
            builder.Property(x => x.HumanName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.SalaryStandardId).IsRequired(false).HasMaxLength(30);
            builder.Property(x => x.SalaryStandardName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.SalarySum).IsRequired(false);
            builder.Property(x => x.NewSalaryStandardId).IsRequired(false).HasMaxLength(30);
            builder.Property(x => x.NewSalaryStandardName).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.NewSalarySum).IsRequired(false);
            builder.Property(x => x.ChangeReason).IsRequired(false);
            builder.Property(x => x.CheckReason).IsRequired(false);
            builder.Property(x => x.CheckStatus).IsRequired(false);
            builder.Property(x => x.Register).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.Checker).IsRequired(false).HasMaxLength(60);
            builder.Property(x => x.RegistTime).IsRequired(false);
            builder.Property(x => x.CheckTime).IsRequired(false);
        }
    }
}
